package com.ag.dataaccess.daoFactory;

import com.ag.dataaccess.dao.*;


/**
 * Factory for Data Access Objects Strategy The DAO pattern can be made highly flexible
 * by adopting the Abstract Factory [GoF] and the Factory Method [GoF] patterns.
 * When the underlying storage is not subject to change from one implementation to another,
 * this strategy can be implemented using the Factory Method pattern to produce a number of DAOs needed by the application.
 * This class is a Factory Method pattern
 *
 * @author Zathura Code Generator http://code.google.com/p/zathura
 */
public class JPADaoFactory {
    private static JPADaoFactory instance = null;

    private JPADaoFactory() {
    }

    /**
    *
    * @return JPADaoFactory
    */
    public static JPADaoFactory getInstance() {
        if (instance == null) {
            instance = new JPADaoFactory();
        }

        return instance;
    }

    /**
    * This method instantiates the IAccionTypeDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IAccionTypeDAO implementation
    */
    public IAccionTypeDAO getAccionTypeDAO() {
        return new AccionTypeDAO();
    }

    /**
    * This method instantiates the ICargoTypeDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return ICargoTypeDAO implementation
    */
    public ICargoTypeDAO getCargoTypeDAO() {
        return new CargoTypeDAO();
    }

    /**
    * This method instantiates the IDocumentTypeDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IDocumentTypeDAO implementation
    */
    public IDocumentTypeDAO getDocumentTypeDAO() {
        return new DocumentTypeDAO();
    }

    /**
    * This method instantiates the IEstadoTypeDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IEstadoTypeDAO implementation
    */
    public IEstadoTypeDAO getEstadoTypeDAO() {
        return new EstadoTypeDAO();
    }

    /**
    * This method instantiates the IProcessDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IProcessDAO implementation
    */
    public IProcessDAO getProcessDAO() {
        return new ProcessDAO();
    }

    /**
    * This method instantiates the IUsersDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IUsersDAO implementation
    */
    public IUsersDAO getUsersDAO() {
        return new UsersDAO();
    }

    /**
    * This method instantiates the IUserTypeDAO class for JPA
    * that is used in this applications deployment environment to access the data.
    * @return IUserTypeDAO implementation
    */
    public IUserTypeDAO getUserTypeDAO() {
        return new UserTypeDAO();
    }
}
